package com.foosun.dao;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import com.foosun.entity.wechat.Infor;

/**
 * 微信平台业务实现
 * 2014-10-09
 */
@Component
public class InforDao extends BaseDao<Infor> {
	
	private static InforDao inforDaoImpl=null;
	private InforDao(){};
	public static InforDao getInforManager(){
		if(inforDaoImpl == null){
			inforDaoImpl = new InforDao();
		}
		return inforDaoImpl;
	}
	
	public void delete(String id) {
		if (id == null || id.equals(""))
			return;
		getJdbcTemplate().execute("delete es_infor where id in (" + id + ")");		
	}

	public JdbcTemplate getJdbcT(){
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
		JdbcTemplate jt = (JdbcTemplate)ctx.getBean("jdbcTemplate");
		return jt;
	}
}
